Repository navigation
Allow untranslated localization handbacks with English fallback - #127
Conversation
Keep locale coverage, source validation, and staged output checks while removing translation-completeness gating. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Consumer pin updates are pushed; seven follow-up PRs are draft and existing environments #1971 is updated.
Validation completed against this exact shared revision: actual YAML contract guards passed for all eight consumers; all 24 YAML files passed formatting. Fourteen enabled native Azure previews passed with publication disabled. Both environments YAMLs also expanded through an enabled isort definition; native environments definitions remain disabled. Real current isort dev handback import produced all 28 required locale files with English fallback. Shared CI is green, including Python 3.10–3.14 tests on Windows and Linux. Merge this shared fix before consumer pin changes. No PRs merged, release builds queued, or extension publication performed. |
|
🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR. |
## Summary - Use the shared Python localization core and composite action rather than copying helper scripts into this extension. - Keep GitHub English submission separate from pull-only DevDiv stable/pre-release imports. - Use drop branch dev and canonical extension ID ms-python.vscode-python-envs; remove tracked generated locale snapshots where present and keep generated files in VSIX selection. - Preserve existing runtime metadata, extraction sources, feeds, platform matrices, and version/validation behavior. - Require complete, nonempty manifest/runtime tables for all 14 supported locales. Allow untranslated strings and wholly untranslated tables with English fallback. Reject missing, empty, malformed, or incomplete handbacks before packaging. ## Shared dependencies - microsoft/vscode-common-python-lsp#125 - https://dev.azure.com/devdiv/DevDiv/_git/Pylance-Eng/pullrequest/801431 - Pilot: microsoft/vscode-isort#777 The GitHub action and Azure tooling checkout are pinned to `6b4a3573e7e7a9fe1e468e129544432278aec2d6`, which implements the approved English-fallback policy in microsoft/vscode-common-python-lsp#127. Both release pipelines use the GitHub-hosted `microsoft/pylance-eng` templates at `refs/heads/main` through `Github-Pylance`. ## Verification Executable guards read the actual YAML and preserve existing triggers, build steps, publication defaults, validation contacts, version flags, and matrices. Both release YAMLs expanded with publishing explicitly disabled (environments used the enabled validation definition because its native definitions are disabled). Actual English export used the pinned CLI through the internal feed. Changed YAML/JSON formatting and whitespace checks passed. ## Setup and release prerequisites The localization drop must contain complete, nonempty manifest/runtime handbacks for all 14 supported locales; translated content is not a readiness requirement. Both native DevDiv release definitions remain disabled; the exact YAML was expanded through the enabled isort validation definition without enabling them. Configure the `PYTHON_LOCALIZATION_APP_ID` Actions variable and `PYTHON_LOCALIZATION_PRIVATE_KEY` secret, or grant access to organization-level credentials. Credential access was not rechecked for this feedback update. Configure access through the owners; do not copy credentials between repositories. Authorize `Github-Pylance` for template, translation, and shared-tooling repository resources in both release pipelines. Merge and publication remain owner-controlled. No merge or publication is requested. ## GitHub pipeline templates - Use `microsoft/pylance-eng` on GitHub instead of `DevDiv/Pylance-Eng` in both stable and pre-release template resources, through the existing `Github-Pylance` service connection. - Preserve `refs/heads/main`, template paths, build steps, localization pins, release settings, and publication defaults. Document service-connection access for template, translation, and shared-tooling resources. - Follow the verified isort change: microsoft/vscode-isort#793 (test run 15971864 succeeded with publishing disabled and Publish skipped). ### Verification - Existing executable actual-YAML localization/release guards passed. - Exact parsed-YAML comparisons against the pre-change commit confirmed that the template resource is the only release configuration change. - All fourteen changed sibling release YAMLs passed formatting; CRLF-aware whitespace checks passed. - Both native release definitions remain disabled. The exact stable and pre-release YAMLs expanded successfully through enabled isort definition 27670, covering all 10 configured build platforms. No pipeline was enabled. - Expanded pipeline checks preserved localization import ordering, source scanning, and disabled publishing/validation-stage conditions. These are preview expansions, not full sibling build runs. No new release builds were queued, no extension was published, and no PR was merged. ## Review feedback follow-up - Runtime environment routing is unchanged from main. Removed the PR-added routing change, explanatory comments, and added global-refresh test to keep this PR focused on localization/pipeline work. - Reconciled the acceptance contract with the README and exact pinned importer: wholly untranslated tables are allowed with English fallback; complete/nonempty locale coverage and structural validation remain required. - TypeScript compilation, targeted ESLint, whitespace checks, and all 76 focused environment-routing/global-selection tests passed. Verified that the GitHub action and both release imports use the approved English-fallback revision. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d6166fde-f261-4e66-abe4-3ef5c1313713
Summary
Allow untranslated strings, including wholly untranslated locale tables, to use English until translations arrive. Keep missing/duplicate locale, empty source/table, malformed input, and invalid generated JSON checks. Import remains staged before source mutation.
Verification
All 29 standard-library localization/Git regression tests passed, along with Black/isort/Flake8. Real pinned l10n-dev import of current isort dev handbacks generated all 28 tables; all 13 real languages retain English manifest/runtime text. No release or publication was triggered.
Consumer release pins must be updated to this reviewed revision. This changes the earlier translation-readiness policy at the user request; English fallback is acceptable.